
	<!DOCTYPE html>

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<link href="__PUBLIC__/Theme3/css/font-awesome.min.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=no">
<meta name="format-detection" content="telephone=no">
<script language="javascript" src="__PUBLIC__/Theme3/js/jquery-1.11.1.min.js"></script>
<script language="javascript" src="__PUBLIC__/Theme3/js/jquery.gcjs.js"></script>
<!--<link rel="stylesheet" type="text/css" href=".__PUBLIC__/Theme3/addons/sz_yi/template/mobile/default/static/css/style_red.css">-->



<link rel="stylesheet" type="text/css" href="__PUBLIC__/Theme3/css/base.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Theme3/css/jquery-weui.min.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Theme3/css/weui.min.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Theme3/css/style.css">
<!--new add start for style1 2016.09.09-->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Theme3/css/font-awesome.min(1).css">

<link rel="stylesheet" type="text/css" href="__PUBLIC__/Theme3/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Theme3/css/style1.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Theme3/css/main.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Theme3/css/iconfont.css">
<!--new add end for style1-->
<script>window.PointerEvent = undefined</script></head>
<body>


<title>注册会员</title>

<style type="text/css">
    body {margin:0px; background:#fff; font-family:'微软雅黑'; -moz-appearance:none;}

    .info_main {height:auto;  background:#fff; margin-top:30px;}
    .info_main .line {margin:0 3% 15px 3%; height:40px; border:1px solid #e8e8e8; line-height:40px; color:#999;padding: 2px 0;box-sizing: content-box;position: relative;clear:both;}
    .info_main .line .title {height:40px; width:40px; line-height:40px; color:#444; float:left; font-size:16px;}

    .info_main .line .title img{width: 30px;height: 30px;vertical-align: top;padding: 2px 0 0 5px;box-sizing: content-box;}
    .info_main .line .info { width:100%;float:right;margin-left:-40px; }
    .info_main .line .inner { margin-left:40px; }
    .info_main .line .inner input {height:38px; width:100%;display:block; padding:0px; margin:0px; border:0px; float:left; font-size:16px;color: #aeaeae;background: #fff;outline: none;}
    .info_main .line .inner .user_sex {line-height:40px;}

    .register {height:44px; margin:14px 3%; background:#ff644e; border-radius:4px; text-align:center; font-size:16px; line-height:44px; color:#fff;}
    /*.info_sub {height:44px; margin:14px 5px; background:#ccc; border-radius:4px; text-align:center; font-size:16px; line-height:44px; color:#fff;}*/
    .nobindmobile {clear:both;height:44px; margin:14px 5px; background:#ccc; border-radius:4px; text-align:center; font-size:16px; line-height:44px; color:#fff;}
    .select { border:1px solid #ccc;height:25px;}

    #btnSendCode{position: absolute;right: 0;top: 0;background:#ff644e;border: none;width: 25%;height: 100%;color: #fff;margin-right: 3%;}
   .logo{text-align:center}
    .logo h4{font-weight: bold;}
    .ysa{color:#0ebbe7;}
    .tbottom{
        line-height: 20px;
        color: #444;
        position: absolute;
        float: left;
        margin-left:90%;
        font-size: 16px;}
</style>
<script src="__PUBLIC__/Theme3/js/reg/mobiscroll.core-2.5.2.js" type="text/javascript"></script>
<script src="__PUBLIC__/Theme3/js/reg/mobiscroll.core-2.5.2-zh.js" type="text/javascript"></script>
<link href="__PUBLIC__/Theme3/js/reg/mobiscroll.core-2.5.2.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/Theme3/js/reg/mobiscroll.animation-2.5.2.css" rel="stylesheet" type="text/css">
<script src="__PUBLIC__/Theme3/js/reg/mobiscroll.datetime-2.5.1.js" type="text/javascript"></script>
<script src="__PUBLIC__/Theme3/js/reg/mobiscroll.datetime-2.5.1-zh.js" type="text/javascript"></script>
<script src="__PUBLIC__/Theme3/js/reg/mobiscroll.android-ics-2.5.2.js" type="text/javascript"></script>
<link href="__PUBLIC__/Theme3/js/reg/mobiscroll.android-ics-2.5.2.css" rel="stylesheet" type="text/css">

<div id="container"><div class="page_topbar">
   <!-- <a href="javascript:;" class="back" onclick="history.back()"><i class="fa fa-angle-left"></i></a>-->
    <div class="title"><{$Sys_systemName.sName}>会员注册</div>
</div>
<div class="info_main">
  <div class="logo"><img src="/uploads/lunboimg/2019-02-18/5c6a5953cdacc.png" width="150" height="150">
            <h4>注册邀请人</h4>
            <h4 class="ysa"><{$tuijianma}></h4>
        </div>
                    <form method="post" action="__URL__/Add_Action" class="form-horizontal" id="form-admin-add"
                          enctype="multipart/form-data">
        <div class="line"><div class="title"><img src="__PUBLIC__/Theme3/images/uname.png" alt=""></div><div class="info"><div class="inner"><input type="text" id="ReferralCode" placeholder="请输入你的推荐码:" value="<{$tuijianma}>" disabled="none"></div></div></div>
    <div class="info_main">
		<input type="hidden" name="tuijianmanew" id="tuijianmanew" value="<{$tuijianma}>" />

        <div class="line"><div class="title"><img src="__PUBLIC__/Theme3/images/uname.png" alt=""></div><div class="info"><div class="inner"><input type="text" id="mobile" name="mobile" placeholder="请输入商家手机号码" value=""></div></div></div>

		<if condition="$Sys_systemName[sRegUserCheckCode] eq 1">
		
        <div class="line" style="width:50%;float:left;"><div class="title"><img src="__PUBLIC__/Theme3/images/uname.png" alt=""></div><div class="info"><div class="inner"><input type="text" id="code" name="code" placeholder="请输入验证码" value="" ></div></div></div>

        <div class="line" style="    width: 29%;
    float: left;
    clear: inherit;"><div class="info"><div class="inner" style="margin-left:0px;"><input type="button" id="zphone" name="zphone" value="获取验证码" style="    color: #333;"></div></div></div>
	
		</if>
		
        <div class="line"><div class="title"><img src="__PUBLIC__/Theme3/images/uname.png" alt=""></div><div class="info"><div class="inner"><input type="text" id="realname"  name ="realname" placeholder="请输入商家姓名" value=""></div></div></div>

        <div class="line"><div class="title"><img src="__PUBLIC__/Theme3/images/upsw.png" alt=""></div><div class="info"><div class="inner"><input type="password" name="password" id="password" placeholder="请输入商家登录初始密码" value=""></div></div></div>

        <div class="line"><div class="title"><img src="__PUBLIC__/Theme3/images/upsw.png" alt=""></div><div class="info"><div class="inner"><input type="password" name="cpassword" id="cpassword" placeholder="请确认密码" value=""></div></div></div>
		
		
        <div class="line" style="height:80px;"><div class="title"><img src="__PUBLIC__/Theme3/images/uname.png" alt=""></div><div class="info">
		<div class="inner">
		上传微信二维码：
		<input type="file" id="wexin" name="weixin" class="weixin" placeholder="s" value="">
		</div></div></div>
		

    </div>
    <div class="register">提交</div>
                    </form>
    <!-- <div class="info_sub">登录</div> --></div></div>

<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/jquery.validate.min.js"></script>

<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/messages_zh.min.js"></script>

<script type="text/javascript" src="__PUBLIC__/Theme1/check/js/validate-methods.js"></script>
  
<div class="info_main">

 <style>
	.error{background:#ddd;padding:10px 20px;border-radius:5px;color:red;text-align:center;margin:0 auto;}
 </style>
 
<script language="javascript">
	$(".register").click(function(){
		
			
		if($("#mobile").val()==""){
            setError("请输入商家手机号码")
			return false;
		}
		
		  var reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;

        $("#txt_tel-error").remove();
        if (!reg.test($("#mobile").val())) {
            setError("商家手机号码格式不正确")
			return false;
        }
		
		<if condition="$Sys_systemName[sRegUserCheckCode] eq 1">
		if($("#code").val()==""){
            setError("请输入验证码")
			return false;
		}
		</if>
		if($("#realname").val()==""){
            setError("请输入商家姓名")
			return false;
		}
		
		
		if($("#password").val()==""){
            setError("请输入商家登录初始密码")
			return false;
		}
		if($("#cpassword").val()==""){
            setError("请确认密码")
			return false;
		}
		if($("#cpassword").val() != $("#password").val()){
            setError("两次密码输入不一致")
			return false;
		}
	
		if($("#wexin").val()==""){
            setError("请上传微信二维码")
			return false;
		}
		
			
	
		$("#form-admin-add").submit();
	})
	
	
	function setError(message){
	
			$(document.body).append('<div id="txt_tel-error" class="error" >'+message+'</div>');	
			
			setTimeout(function(){
				$("#txt_tel-error").css("display","none");
			},2000)
	}
	
	
	
		$("#zphone").click(function(){
			$("#mobile").blur();
			
			
			sendMobileCode($("#mobile"), "", $(this));
		});
		
		
		
function sendMobileCode(mobileObj, mobileCodeObj, sendButton) {
	
		var mobileval = $(mobileObj).val();
		if(mobileval==""){
			alert("请输入手机号")
			return false;
		}
		 var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
            if (!myreg.test(mobileval)) {
				alert("手机号码格式不正确")
                return false;
            } 
			
			// 发送邮件
			var url ="__URL__/reguser";
			$.post(url, {
				mobile_phone: mobileObj.val()
			}, function(result) {
				if (result == 'ok') {
					// 倒计时
					countdown(sendButton);
					
					
				} else {
					alert(result);
				}
				
			}, 'text');
		
}

var wait = 60;
function countdown(obj, msg) {
	obj = $(obj);

	if (wait == 0) {
		obj.removeAttr("disabled");
		obj.val(msg);
		wait = 60;
	} else {
		if (msg == undefined || msg == null) {
			msg = obj.val();
		}
		obj.attr("disabled", "disabled");
		obj.val(wait + "秒后重新获取");
		wait--;
		setTimeout(function() {
			countdown(obj, msg)
		}, 1000)
	}
}
	
	
</script>
</body></html>
